<?php

namespace App\Http\Requests\Api\v2;

use App\Http\Requests\CommonRequest;

class HospitalRequest extends CommonRequest
{
    public $scenes = [
        'query'=>'longitude,latitude'
    ];

    public function rules()
    {
        return [
            'name' => ['required'],
            'tel' => ['required',],
            'longitude' => ['required'],
            'latitude' => ['required'],
        ];
    }

    public function listRules(){
        return [
            'longitude' => ['required'],
            'latitude' => ['required'],
        ];
    }

    public function messages()
    {
        return [
            'name.required' => "医院名称不能为空",
            'tel.required' => "电话不能为空",
            'longitude.required' => "经度不能为空",
            'latitude.required' => "纬度不能为空",
        ];
    }
}
